home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: a dump question from a novice C programme
- Date: 30 Jan 1996 16:37:16 GMT
- Organization: OpenVision
- Message-ID: <4elhfs$puj@spanky.pls.ov.com>
- References: <jyli-2801960040100001@li.gsfc.nasa.gov>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article 2801960040100001@li.gsfc.nasa.gov, jyli@climate.gsfc.nasa.gov (Jason Li) writes:
- >
- >I have just started programming in C, still feel dizzy sometimes when
- >looking at cryptic C code. Occasionally I come across code like this:
- >
- >for (iv=0; iv < specp->nlvars; iv++)
- >
- >what does this symbol "->" mean? I've looked all over my C books, could
- >not find anything on it.
- >
- >
- >Thanks in advance
- >
- >--
- >Jason Li | Email:jyli@climate.gsfc.nasa.gov
- >Climate and Radiation Branch | Tel: (301) 286 1029
- >NASA Goddard Space Flight Center | Fax: (301) 286 1759
- >Greenbelt, MD 20771 U.S.A. | WWW: http://climate.gsfc.nasa.gov
-
-
- The '->' means access the value of a member of a struct using a pointer
- to that struct. In the case of the above example, the following two
- lines are exact equivalents (guess which is easier to type):
-
- specp->nlvars
- (*specp).nlvars
-
- See K+R2 pg. 131
-
- Fletcher.Glenn@ov.com
-
-
-